function require(path) {
  var loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader);
  
  if (path.match("chrome://"))  url = path;
  else                          url = "chrome://lark/content/" + path + ".js";
  loader.loadSubScript(url);
}

function send(str) {
  var doc = $('main-browser').contentDocument;
  var elt = doc.createElement('script');
  var text = doc.createTextNode(str);
  elt.appendChild(text);
  doc.body.appendChild(elt);
}